<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Email Id</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script src="../js/jquery-1.4.2.js" type="text/javascript" language="javascript"></script>
<link href="../css/style.css" rel="stylesheet" type="text/css" />
<link href="../css/menu.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="../js/sorttable/sorttable.js"></script> 
</head>
<body class="body">
<?php 
/*
 * Summary : Created By Avik on 29th june,2011
 * Version : 1.0
 * Contents: This file Shows All the data Admin Home page
 * Chnages
 */
//#########INCLUDE FILES########
include_once '../conf/db-config.php';
include_once '../conf/error.php';
include_once '../clsFetchData.php';
include_once '../array_to_xml.php';
include_once 'city-name.php';
include_once '../submitemail.php';
//##############################

$requested_id =$_REQUEST['id'];
?>
<script type="text/javascript">
function mailThis(id)
{
	var additionalEmailId = document.getElementById("txtAdditionalEmailId").value;
	if(additionalEmailId.length==0)
	{
		alert("Email Id can not be blank");
		return false;
	}
	else
	{
		$.post("trigger-mail.php",{trigger_id:id,additionalEmailId:additionalEmailId},function(data)
		{
			if(data==1)
			{
				alert("Email Sent Successfully");
				window.close();
			}
			else
			{
				alert("Server is too Busy..Please try again later.");
			}		
		},"text");
	}
}
</script>
<div>
<div align="center">
<!-- Text Box Area Starts -->
	<table cellpadding="0" cellspacing="0" border="0" width="500">
		<tr>
			<td>
				<fieldset>
					<legend>Enter e-Mail id to send this Listing</legend>
					<table>
						<tr>
						<td width="100">
							<span style="color: #000;text-decoration: none;font-weight: normal;">Email Id:</span>
						</td>
						<td width="400">
							<input type="text" id="txtAdditionalEmailId" name="txtAdditionalEmailId" width="60" />
						</td>
						</tr>
						<tr>
						<td colspan="2" align="center">
							<input type="button" class="btnClass" id="btnSendMail" name="btnSendMail" onclick="mailThis('<?php echo $requested_id; ?>')" value="Send Mail >>" />
						</td>
					</table>
				</fieldset>
			</td>
		</tr>
	</table>
<!-- Text Box Area Ends -->
</div>
</div>
</body>
</html>